<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <style>
        #test {
            width: 300px;
            display: flex;
            justify-content: center;
            height: 300px;
            align-items: center;
        }
        #test2{
            height: 300px;
            display: flex;
            align-items: center;
        }
    </style>
</head>
<body>
<div id="test"><div id="test2">11111</div></div>
<script>
    var i=0;
    function test() {
         i++;
         if(i>=5){
             return i;
         }
         var k = test();
         return k;
    }
    console.log(test());
</script>
</body>
</html>